package Classwork;

import java.util.Scanner;

public class Test04 {
    public static void main(String[] args) {
        int[] arr = {11, 25, 30, 40, 33, 90, 100};
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入一个target值：");
        int targer=reader.nextInt();
        for (int i=0;i<arr.length-1;i++){
            for (int j=i+1;j<arr.length;j++){
                if (arr[i] + arr[j]==targer) {
                    System.out.println("["+i+","+j+"]");
                    return;
                }
            }
        }
        System.out.println("无符合结果");
    }
}
